from appium import webdriver



url = 'http://127.0.0.1:14723/wd/hub'
data = {
    'platformName':'Android',
    'deviceName':'127.0.0.1:62001',
    'platformVersion':'5.1.1',
    'appPackage':'com.baidu.appsearch',
    'appActivity':'com.baidu.appsearch.SplashActivity'

}
driver = webdriver.Remote(url,data)

driver.close()